import request from '@/sheep/request';

const TagApi = {
  // 查询联系人标签
  queryContactTag: (data) => {
    return request({
      url: '/relation/tag/queryContactTag',
      method: 'POST',
      data,
      custom: {
        auth: true
      },
    });
  },
  // 删除联系人标签
  deleteContactTag: (data) => {
    return request({
      url: '/relation/tag/deleteContactTag',
      method: 'POST',
      data,
      custom: {
        auth: true,
        successMsg: '删除成功'
      },
    });
  },
  // 添加联系人标签
  addContactTag: (data) => {
    return request({
      url: '/relation/tag/addContactTag',
      method: 'POST',
      data,
      custom: {
        auth: true,
        successMsg: '设置成功'
      },
    });
  },
  // 新增或修改标签分组
  addOrUpdateTagGroup: (data) => {
    return request({
      url: '/relation/tag/addOrUpdateTagGroup',
      method: 'POST',
      data,
      custom: {
        auth: true,
        successMsg: '设置成功'
      },
    });
  },
  // 删除标签分组
  delTagGroup: (data) => {
    return request({
      url: '/relation/tag/delTagGroup',
      method: 'POST',
      data,
      custom: {
        auth: true,
        successMsg: '删除成功'
      },
    });
  },
  // 查询标签分组列表
  queryTagGroupList: (data) => {
    return request({
      url: '/relation/tag/queryTagGroupList',
      method: 'POST',
      data,
      custom: {
        auth: true,
        successMsg: '设置成功'
      },
    });
  },
  // 添加或修改标签
  addOrUpdateTag: (data) => {
    return request({
      url: '/relation/tag/addOrUpdateTag',
      method: 'POST',
      data,
      custom: {
        auth: true,
        successMsg: '设置成功'
      },
    });
  },

  // 批量设置标签联系人
  batchSetTagContact: (data) => {
    return request({
      url: '/relation/tag/batchSetTagContact',
      method: 'POST',
      data,
      custom: {
        auth: true,
        successMsg: '设置成功'
      },
    });
  },

  // 批量删除标签联系人
  batchDelTagContact: (data) => {
    return request({
      url: '/relation/tag/batchDelTagContact',
      method: 'POST',
      data,
      custom: {
        auth: true,
        successMsg: '设置成功'
      },
    });
  },

  // 删除标签
  delTag: (data) => {
    return request({
      url: '/relation/tag/delTag',
      method: 'POST',
      data,
      custom: {
        auth: true,
        successMsg: '删除成功'
      },
    });
  },
  // 添加标签
  addTag: (data) => {
    return request({
      url: '/relation/tag/addTag',
      method: 'POST',
      data,
      custom: {
        auth: true,
        successMsg: '设置成功'
      },
    });
  },
  // 查询标签
  queryTags: (data) => {
    return request({
      url: '/relation/tag/queryTags',
      method: 'POST',
      data,
      custom: {
        auth: true,
        successMsg: '设置成功'
      },
    });
  },


};

export default TagApi;
